{% extends 'page-builder-base.twig' %}
{% set bodyClasses = 'page-wine single' %}
{% set fullTitle =  wine.vintage.title|default('') ~ ' ' ~ wine.title %}
{% block title %}
<title>{{fullTitle}} | {{siteTitle}}</title>
{% endblock %}


{% block content %}
{#dump(groups)#}
    <section id="Our-Wine" class="section-wine">
		<div id="wine-detail" class="wine-detail">

            <div class="wine-nav">
        {% if (prev != null) %}
				<a href="{{ url('wine-details', { wine: prev.metadata.urlfragment } )}}" class="prev">&lsaquo; Previous Wine</a>
				{% endif %}
				{% if (next != null) %}
				<a href="{{ url('wine-details', { wine: next.metadata.urlfragment } )}}" class="next">Next Wine &rsaquo;</a>
				{% endif %}
			</div>

			<h2 class="name">{{fullTitle}}</h2>
			<img class="wine-hero" src="/images/assets/{{ wine.image_id }}/4/" alt="{{ fullTitle }}" />
			<div class="details">
				<div class="meta">
		    		<div class="block">
		    			<div class="figure">${{ wine.price|number_format(2) }}</div>
		    			<form class="buy-form" method="post" action="/Cart/">
                            <input type="hidden" name="orderStep" value="orderItem">
                            <input value="{{ wine.id }}" name="productId" type="hidden"/>
		    				<ul>
		    					<li>
                                    <select name="quantity">
                                        <option value="1">Qty:</option>
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="3">3</option>
                                        <option value="4">4</option>
                                        <option value="5">5</option>
                                        <option value="6">6</option>
                                        <option value="7">7</option>
                                        <option value="8">8</option>
                                        <option value="9">9</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">1 Case</option>
                                        <option value="24">2 Cases</option>
                                        <option value="36">3 Cases</option>
                                        <option value="48">4 Cases</option>
                                        <option value="60">5 Cases</option>
                                    </select>
		    					</li>
		    					<li>
		    						<input type="submit" name="" value="Add to cart &rsaquo;" class="button" />
		    					</li>
		    				</ul>
		    			</form>

		    			{% include "includes/shipping-notice.twig" %}
		    		</div>
		    		<div class="block">
			    		<h3>Vineyard Region</h3>
			    		{{wine.region.title|default('')}}
		    		</div>
		    		<div class="block">
			    		<h3>Vinification</h3>
              {{ wine.vinification|raw }}
		    		</div>

		    		<div class="block">
			    		<h3>Winemaker</h3>
			    		{{wine.winemaker}}
		    		</div>
				</div>
				<hr />
				<div class="history">
          {{ wine.notes|raw }}
				</div>
			</div>
		</div>
		{% include "includes/wine-slider.twig" %}
    </section><!-- #Our Wines -->
{% endblock %}
{% block aside %}
{% endblock %}
